﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DataReporte2.aspx.cs" Inherits="Reports_DataReporte2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 40px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table style="width:100%">
  <tr>
    <td class="style1">
    
        <asp:Label ID="Label1" runat="server" Text="Ruta"></asp:Label>
        </td>
    <td>
        <asp:DropDownList ID="DropDownList1" runat="server" 
            DataSourceID="SqlDataSource1" DataTextField="nombre_ruta" 
            DataValueField="nombre_ruta" ondatabinding="DropDownList1_DataBinding" 
            ondatabound="DropDownList1_DataBound" ondisposed="DropDownList1_Disposed" 
            oninit="DropDownList1_Init" onload="DropDownList1_Load" 
            onprerender="DropDownList1_PreRender" 
            onselectedindexchanged="DropDownList1_SelectedIndexChanged" 
            ontextchanged="DropDownList1_TextChanged" onunload="DropDownList1_Unload">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:EnGasAdoConnectionString %>" 
            SelectCommand="SELECT [nombre_ruta] FROM [tbl_ruta]"></asp:SqlDataSource>
      </td>		
    
  </tr>
  <tr>
    <td class="style1">
        <asp:Label ID="Label2" runat="server" Text="Fecha" Visible="False"></asp:Label>
      </td>
    <td>
        <asp:DropDownList ID="DropDownList2" runat="server" 
            DataSourceID="SqlDataSource2" DataTextField="fecha" DataValueField="fecha" 
            Visible="False">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:EnGasAdoConnectionString %>" 
            SelectCommand="SELECT DISTINCT dbo.Precio.fecha FROM dbo.tbl_ruta INNER JOIN dbo.tbl_gasolinera_x_ruta ON dbo.tbl_ruta.id_ruta = dbo.tbl_gasolinera_x_ruta.id_ruta INNER JOIN dbo.Gasolinera ON dbo.tbl_gasolinera_x_ruta.id_gasolinera = dbo.Gasolinera.ID_Gasolinera INNER JOIN dbo.Precio ON dbo.Gasolinera.ID_Gasolinera = dbo.Precio.ID_Gasolinera">
        </asp:SqlDataSource>
      </td>		
    
  </tr>
  <tr>
    <td class="style1">&nbsp;</td>
    <td>
        &nbsp;</td>		
    
  </tr>
<tr>
    <td class="style1">&nbsp;</td>
    <td>
        <asp:Button ID="Button1" runat="server" Text="Generr Reporte" 
            onclick="Button1_Click" Visible="False" />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
            Text="seleccionar Fecha" />
    </td>		
    
  </tr>
</table>
    
    </div>
    </form>
</body>
</html>
